package com.whf.android.jar.util.dimen;

import android.content.res.Resources;
import android.util.DisplayMetrics;

import com.whf.android.jar.app.Latte;


/**
 * 获取屏幕宽高
 * @author 傅令杰
 * @date 2017/4/2
 */

public final class DimenUtil {

    public static int getScreenWidth() {
        final Resources resources = Latte.getApplicationContext().getResources();
        final DisplayMetrics dm = resources.getDisplayMetrics();
        return dm.widthPixels;
    }

    public static int getScreenHeight() {
        final Resources resources = Latte.getApplicationContext().getResources();
        final DisplayMetrics dm = resources.getDisplayMetrics();
        return dm.heightPixels;
    }
}
